//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    addPhoto:true,
    focus:false
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
    wx.showShareMenu({
      withShareTicket: true
    })
  },
  moreFunc:function(){
    wx.navigateTo({
      url: 'test?id=1'
    })
  },
  addPhoto:function(){
    this.setData({
      addPhoto: false,
      focus: true
    })
  },
  hidePhoto: function () {
    this.setData({
      addPhoto: true,
      focus: false
    })
  },
  scrolltoupper :function(){
    console.info(123);
    wx.startPullDownRefresh();
  },
  upper: function (e) {
    console.log(e)
  },
  lower: function (e) {
    console.log(e)
  },
  scroll: function (e) {
    console.log(e)
  },
  onPullDownRefresh:function(){
    wx.startPullDownRefresh();
    setTimeout(function () {
      wx.stopPullDownRefresh();
    }, 300);
  },
  onShareAppMessage: function (res) {
    return {
      title: 'Hi,推荐你用用这个小程序',
      path: '/pages/main/more'
    }
  }
})
